import java.util.Comparator;


public class Mycomparator4 implements Comparator{

	@Override
	public int compare(Object o1, Object o2) {
		String a=o1.toString();
		String b=o2.toString();
		int i=a.length();
		int k=b.length();
		if(i<k)
			return -1;
		else if(i>k)
			return 1;
		else
			return a.compareTo(b);
		
	}

}
